package com.xinhe.cn.cpbox.common;

import lombok.Getter;

/**
 * @author yekai
 * @date 2020/6/22 22:06
 */
@Getter
public enum ResultCodeEnum {
    /**
     * 成功
     */
    SUCCESS(true,20000,"成功"),
    /**
     * 未知错误
     */
    UNKNOWN_ERROR(false,20001,"未知错误"),
    /**
     * 参数错误
     */
    PARAM_ERROR(false,20002,"参数错误");

    /**
     * 响应是否成功
     */
    private Boolean success;
    /**
     * 响应状态码
     */
    private Integer code;
    /**
     * 响应信息
     */
    private String message;

    ResultCodeEnum(boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }
}
